package com.my.demo.demo2.web;

import com.my.demo.demo2.model.PayModel;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author shanchong
 * @date 2019-07-12
 **/
@Controller
public class TestController {

    @ResponseBody
    @RequestMapping(value = "/cgi-bin/lepos_pay_gateway.cgi")
    public String pay(PayModel model){
        System.out.println("model:"+model);
        return "<leshua>\n" +
                "    <resp_code><![CDATA[0]]></resp_code>\n" +
                "    <merchant_id><![CDATA[9605008025]]></merchant_id>\n" +
                "    <sign><![CDATA[DB45DA9E55DD666C49F3963733D2602E]]></sign>\n" +
                "    <result_code><![CDATA[0]]></result_code>\n" +
                "    <third_order_id><![CDATA[NL2019032218253138930]]></third_order_id>\n" +
                "    <nonce_str><![CDATA[rzmkrvsvprjjoqgjpzrmubbdeovjhrcu]]></nonce_str>\n" +
                "    <td_code><![CDATA[weixin://wxpay/bizpayurl?pr=kZF1s1X]]></td_code>\n" +
                "    <pay_way><![CDATA[WXZF]]></pay_way>\n" +
                "    <leshua_order_id><![CDATA[0003495002500081]]></leshua_order_id>\n" +
                "</leshua>";
    }

}
